Extension::MongoDBGetRecord Method
Syntax
c GetRecord(C id )
Arguments
- id
_id for a record (_id is the unique field that Mongo guarentees).
Description
Gets a document db record using 'id'.
dim mongo as extension::MongoDB = extension::MongoDB::Create("mongodb://localhost:27017","TestDatabase","flowers") dim id as c = "6065f833dbef84456ce731de" json = mongo.GetRecord(id)
Get a specific document that we know the id of. In this example this is hardcoded, usually this would be stored somewhere and treated like a foriegn key.